From: | Nicholas Clarke |
Date: | 11 Aug 99 at 19:12:26 |
Subject: | Re: Accessing Broken SCSI |
From: Nicholas Clarke <nclarke@diku.dk>
On Wed, 11 Aug 1999, Jack York wrote:
> I am trying to recover some data from a scsi drive on which the RDB
> is lost. I have never tried doing anything with the SCSI device
> so I may be way off here, but my thought was to take the sample
> code below (from the RKM Scsi_direct example) and change it to a
> a SCSIF_READ command. Then search through the read data for what I am
> looking for. But I don't see how to set the starting cylinder, length,
> and data buffer. Is this possible or is there a better (easier) way?
> The filesystem is PFS2 BTW, if it matters.
>
> SCSIReq.io_Length = sizeof(struct SCSICmd);
> SCSIReq.io_Data = (APTR)&Cmd;
> SCSIReq.io_Command = HD_SCSICMD;
>
> Cmd.scsi_Data = (UWORD *)buffer; *
> Cmd.scsi_Length = 254;
> Cmd.scsi_CmdLength = 6;
> Cmd.scsi_Flags = SCSIF_AUTOSENSE|SCSIF_READ;
>
> Cmd.scsi_SenseData =(UBYTE *)Sense; *
> Cmd.scsi_SenseLength = 18;
> Cmd.scsi_SenseActual = 0;
>
> DoIO( &SCSIReq );
Except this code does not include the actual scsi command. You still need
to place the scsi command data in "buffer".
/ngc